[Previous] [Main]

Publishing SWiSH files

Introduction
SWiSH (v1.x and v2.0) creates flash format files (.swf) for playback on the world wide web. They are mostly compatible with the Flash 3 player, and entirely compatible with the Flash 4 and Flash 5 player. Since version 4 of the Netscape Navigator and Microsoft Internet Explorer browsers, such players have been built in (and users usually do not need to download a player).

How to publish a file to the web
In order for any SWiSH created animation to work, both a .html file and a .swf file must be produced and uploaded to your web server. The HTML file serves as a container for the .swf file. It will 'refer' to your .swf file. The reference tells the browser how big to display the file, and which player to use (this will always be the Flash player in SWiSH's case).

If you are adding a SWiSH animation to your web page, you will need to copy the necessary tags into your web page. You can get the tags in SWiSH v1.x by using the 'Export' tab, 'Copy HTML to Clipboard' button. In SWiSH v2 the menu option sequence File | Export | HTML to Clipboard will copy the tags to the clipboard so you can paste them into your page.

If you don't know html or don't have an editor, you can get a .html page fully made up for you, by using File | Publish in SWiSH v1.x and File | Export | HTML in SWiSH v2. In SWiSH v1.x, Publish will automatically create a .swf file for you. In SWiSH v2, you will need to use File | Export | SWF to create the .swf files. Keep the two files in the same directory. Upload them both to your web server. Unfortunately we cannot give generalized instructions for uploading, as many web servers are different. However if you are using ftp to upload your files, you must upload the .swf file in binary mode otherwise it will be corrupted. All FTP programs have options for this.

Why wont my movie play ? My browser (Internet Explorer) sits there with a black window, and downloads the file for 10 minutes! My browser (Netscape) displays a broken link or tries to download the plugin again!
Cause: .swf file has not been uploaded to the web server.
Remedy: upload the .swf file as well as your .html file to your server
Cause: .swf file is corrupted on the server.
Remedy: upload the .swf file again via ftp and binary mode
Cause: your object and embed tags have the wrong filename
Remedy: edit your object and embed tags to have the correct file name
Cause: Mime types on your server are missing or incorrect
Remedy: visit this page at Macromedia for procedures to resolve this http://www.macromedia.com/support/flash/ts/documents/tn4151.html

Why won't my movie play ? It works in netscape but not IE
Cause: the object tags are missing. This commonly occurs with older versions of Microsoft Frontpage, which produce only embed tags when importing a .swf file to a Frontpage managed website.
Remedy: use the File | Export | HTML to Clipboard (SWiSH v2) to get a full set of tags for your file, and paste that over your current object and embed tags in your html editor.

Why won't my movie work ? It works in Internet Explorer but not in Netscape
Cause: the embed tag is missing
Remedy: use the File | Export | HTML to Clipboard (SWiSH v2) to get a full set of tags for your file, and paste that over your current object and embed tags in your html editor.
Cause: the filename contains unusual characters such as spaces.
Remedy: Rename the file in SWiSH to have only alpha numeric . - and _ characters, re-export the file, and recreate your tags (the File | Export | HTML to Clipboard option). Paste in your updated tags.

My background colour in my movie is wrong. It doesn't match the background colour of my website
Cause : The background colour is set externally via the tags. If you edit your web page and change your web pages background, and change the colour to match in SWiSH, but don't change the tags in your html, the colour set by the tags will override the colours set in SWiSH.
Remedy : Either, edit your tags to have the matching colours, or recreate your tags from SWiSH (File | Export | HTML to Clipboard), and paste these into your page.

My text is blurry (anti-aliased)
Cause : the Flash player does this automatically. Its much more noticeable on small point sizes
Remedy : if its suitable, increase the point size. If not, edit the tags (in your html page), and set the quality to autolow. Then check the file to see if this made anything else work poorly. See the tag sections below if you need information on tags.

My movie is not in the same position in Netscape Communicator compared to Microsoft Internet Explorer
Causes: This can be because your html is not strictly correct, and some parts are missing in one or the other browser. Generally Microsoft Internet Explorer will try and "render around problems". Netscape Communicator is less tolerant of poorly formed html. Alignment problems in Netscape Communicator can be caused by excess white space in table definitions (in and around the tr and td tags). It can be caused by using CSS syntax to position elements, which Netscape Communicator 4 implements differently to other browsers. It can be caused by simple differences in the browsers themselves (Netscape Communicator 4.06 positions slightly differently to Communicator 4.08 and all other Netscape browsers that followed). Microsoft Internet Explorer positions things slightly differently to Netscape Communicator in general, particulary with tables and margin sizes.
Remedy : These are html and browser problems, not SWiSH problems. You'll get different problems depending on which editors and browsers you use to create and test your pages. Each situation is different and you'll have to experiment to get it right. Here are some things to try. Try removing excess whitespace. Try setting more element positions explicitely. (use fixed sizes in tables, put size parameters for pictures etc). Try simplifying your tables, (less column and row spans). Use sub tables instead. Try setting fonts explicitely. Try removing fussy aspects of your design, or replace cut up pictures with single pictures. If you have Dreamweaver and Frontpage, try loading the file into Dreamweaver and using the "strip microsoft' command.
There are many useful sources of correct html syntax. The official reference is this site : http://www.w3c.org/


My html background image doesn't show through the movie, even though I chose transparent
Transparency is only supported by Microsoft Internet Explorer 5 onwards. It will not work in Netscape Communicator, Mozilla, or Microsoft Internet Explorer 3, or 4.

My browser crashes (or more commonly, my clients browser crashes!)
Cause: Predominantly the browser that crashes is Netscape 4.7 or Netscape 4.71. This browser was shipped originally with a buggy flash player. Its suffers from both random lockups, and instant lockups when presented with certain version flash files.
Remedy: Downloading and Installing the Flash 5 player will generally solve this problem. For best results, its worth updating the Netsape 4.7 browser as well. The Flash 5 player can be located at http://www.macromedia.com/
and later versions of Netscape Communicator 4.7 can be located at http://www.netscape.com/
Cause: The .swf file is corrupted on the web server.
Remedy: Re-export and re-upload your movie.

Reference material : Explanation of the html tags.
SWiSH is primarily concerned about creating .swf files. Thus the HTML creation facilities are automated and limited. If you want or need finer control over how your SWiSH created animation appears on your website, you may need to edit the tags concerned (either with a text editor such as notepad, or a html editor such as Frontpage or Dreamweaver).
There are 3 types of tags. Object and Parameter tags, and the embed tag.
Object and Parameter tags are generally used by the Microsoft Explorer browser to display .swf files.

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=4,0,0,0" id="Movie1" width="400" height="300">  
 
the object tag, tells the browser were to find a downloadable player if one is not installed already. If you want the movie to fill the browser window, set the width to "100%" and height to "100%"
<param name="movie" value="Movie1.swf">  
the above param tag tells the browser which .swf file to play
<param name="quality" value="high">  
this parameter controls the playback quality. Set it to low or auto-low if you are having problems with anti-aliased text
<param name="bgcolor" value="#FFFFFF">  
this tag controls the background colour of the movie. It overrides any settings in the movie itself. If your movies background doesn't match your html body background colour, (when you meant it to), this tag is always the cause.
<embed name="Movie1" src="movie1.swf" quality="high" bgcolor="#FFFFFF" width="400" height="300" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">  
The embed tag does everything that the object and parameter tags do for IE, in one tag for the Netscape browser. Note that it is usually within the Object tag. (most versions of IE understand both embed and object, so if you don't put the embed inside the object tag, you'll get 2 movies in IE and one movie in Netscape). The properties work the same as the individual parameter tags do for IE. The most important thing to note, if you change a param tag for IE, you must make the same change to the corresponding embed tag property to retain consistent results across both browser types.
</embed>  
</object>  
these tags close the embed and object tags. The object tag is always after or below the embed tag. (the embed tag is contained completely within the object tag).

[Previous] [Main]